package day20170504.ch02;

/**
 * 多线程测试
 * @author 罗智壕-13424431416
 *
 * 2017年5月4日
 */
public class TicketThreadTest {
	public static void main(String[] args) {
		TicketThread t = new TicketThread();
		
		//新建5个线程
		Thread t01 = new Thread(t);
		Thread t02 = new Thread(t);
		Thread t03 = new Thread(t);
		Thread t04 = new Thread(t);
		Thread t05 = new Thread(t);
		
		//设置窗口的名字
		t01.setName("窗口1");
		t02.setName("窗口2");
		t03.setName("窗口3");
		t04.setName("窗口4");
		t05.setName("窗口5");
		
		//开始执行run方法，运行线程
		t01.start();
		t02.start();
		t03.start();
		t04.start();
		t05.start();
	}
}
